package com.rran.study.designpattern.behavioral.template.repository;


import com.rran.study.designpattern.behavioral.template.service.Shopping;
import com.rran.study.designpattern.behavioral.template.service.spring.AbstractSpringShopping;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author yy
 * @Type ShoppingPersonRepository.java
 * @Desc
 * @date 2020/7/21 14:59
 */
public class ShoppingPersonRepository {

    private static Map<String, Shopping> shoppingMap = new ConcurrentHashMap<>();

    public static void storeShopping(String name, Shopping shopping) {
        shoppingMap.put(name, shopping);
    }

    public static Shopping getShopping(String name) {
        return shoppingMap.get(name);
    }
}
